package city.spring.modules.reception.repository;

import city.spring.modules.reception.entity.OldmanServiceRecordEntity;
import city.spring.modules.reception.vo.OldmanServiceRecordVO;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * 存储库：志愿者服务记录
 *
 * @author pxm
 * @date 2020-07-01 11:16:48
 */
@Repository
public interface OldmanServiceRecordRepository extends BaseMapper<OldmanServiceRecordEntity> {
    /**
     * 分页获取服务记录
     *
     * @param page    分页对象
     * @param wrapper 查询对象
     * @return 服务记录
     */
    IPage<OldmanServiceRecordVO> listPage(Page<? extends OldmanServiceRecordEntity> page, @Param(Constants.WRAPPER) Wrapper<? extends OldmanServiceRecordEntity> wrapper);

    void updateByVolunteer(OldmanServiceRecordEntity entity);
}